/**
 * Copyright (C) 2013-2014 the original author or authors.
 */
package com.foreveross.bsl.comments.model.domain.repository.custom;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;

import com.foreveross.bsl.comments.model.domain.CommentFeedback;

/**
 * xxx
 * 
 * @author Wangyi
 * @version v1.0
 * 
 * @date 2013-8-13
 * 
 */
public class CommentFeedbackRepositoryImpl implements CommentFeedbackRepoCustom {

	@Autowired
	private MongoTemplate mongoTemplate;

	@Override
	public void deleteByCommentId(String commentId) {
		Query query = Query.query(Criteria.where("commentId").is(commentId));
		this.mongoTemplate.remove(query, CommentFeedback.class);
	}
}
